// 以下是系统业务组件
import HProHeader from './hpro-header/index.vue'
import HProFooter from './hpro-footer/index.vue'
import HProSidebar from './hpro-sidebar/index.vue'
import HProNavbar from './hpro-navbar/index.vue'
import HProContainerHome from './hpro-container-home/index.vue'
import HProContainerAccount from './hpro-container-account/index.vue'
import HProHelp from './hpro-help/index.vue'
import HProDialogBranch from './hpro-dialog-branch/index.vue'
import HProSelectTags from './hpro-select-tags/index.vue'
import HProSelectCard from './hpro-select-card/index.vue'
import HProCheckboxCard from './hpro-checkbox-card/index.vue'
import HProDialogReward from './hpro-dialog-reward/index.vue'
import HProUploadImg from './hpro-upload-img/index.vue'
import HProDialogImage from './hpro-dialog-image/index.vue'

const components = [
  HProHeader,
  HProFooter,
  HProSidebar,
  HProNavbar,
  HProContainerHome,
  HProContainerAccount,
  HProHelp,
  HProDialogBranch,
  HProSelectTags,
  HProSelectCard,
  HProCheckboxCard,
  HProDialogReward,
  HProUploadImg,
  HProDialogImage
]
const install = function (Vue) {
  if (install.installed) return
  components.map(component => {
    Vue.component(component.name, component)
  })
}

// auto install
if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue)
}

export default {
  install
}
